/******************************************************************************
 cnome: A C++ source "genes" discover. :-)

 See more details at:

   http://www.codeplex.com/cnome

 The original author site is at: http://www.alexandre-barbosa.com/

 Copyright (c) 2008 Alexandre Barbosa.
 Distributed under the MIT License. (See accompanying file LICENSE-MIT.txt 
 or at http://www.codeplex.com/cnome/license)
 ******************************************************************************/

#ifndef CNOME_TYPEDEFS_H
#define CNOME_TYPEDEFS_H

#ifdef CNOME_TRACE_ON 
#ifndef BOOST_SPIRIT_DEBUG
#define BOOST_SPIRIT_DEBUG  ///$$$ DEFINE THIS BEFORE ANYTHING ELSE $$$///
#endif
#define CNOME_DEBUG
#endif

#include <list>
#include <map>
#include <string>

#include <boost/spirit/include/classic_core.hpp>
#include <boost/spirit/include/classic_error_handling.hpp>
#include <boost/spirit/include/classic_multi_pass.hpp>

///////////////////////////////////////////////////////////////////////////////
//  Include Wave itself
#include <boost/wave.hpp>

///////////////////////////////////////////////////////////////////////////////
// Include the lexer stuff
#include <boost/wave/cpplexer/cpp_lex_iterator.hpp> // lexer class
#include <boost/wave/cpplexer/cpp_lex_token.hpp>    // token class

#include <tst_avl.h>

namespace cnome {
//  The template boost::wave::cpplexer::lex_token<> is the token type to be 
//  used by the Wave library.
typedef boost::wave::cpplexer::lex_token<> token_t;

//  The template boost::wave::cpplexer::lex_iterator<> is the lexer type to
//  be used by the Wave library.
typedef boost::wave::cpplexer::lex_iterator<token_t> lex_iterator_type;

//  This is the resulting context type to use. The first template parameter
//  should match the iterator type to be used during construction of the
//  corresponding context object (see below).
typedef boost::wave::context<std::string::iterator, lex_iterator_type>	context_t;
typedef context_t::iterator_type iterator_T;

typedef boost::wave::cpplexer::token_annotation token_annotation;
typedef boost::wave::cpplexer::token_annotation_ptrT token_annotation_ptrT;
typedef std::list<token_t> adornersT;
typedef adornersT::iterator it_adornersT;

class symbolItem;
typedef boost::shared_ptr<symbolItem> symbolItemPtr;

typedef cnome::tst_avl::tst_avl<std::string, symbolItemPtr> cnome_symbolsT;
typedef cnome::tst_avl::tst_avl<std::string, symbolItemPtr>::iterator itSymbolItem;

// Foward declaration
class cnome_iterator;

typedef boost::spirit::classic::scanner<cnome_iterator>          scanner_t;
typedef boost::spirit::classic::rule<scanner_t>           rule_t;
typedef std::list<symbolItemPtr>  scopeT;
typedef std::list<scopeT>         lstScopeT;
typedef std::vector<int>          prmPNumsT;
typedef std::map<std::string, token_t>        prmsT;
typedef std::list<prmsT>          lstprmsT;
typedef std::list<bool>           lstTdc;
typedef std::list<itSymbolItem>   lstItSblsT;
typedef scopeT::const_iterator    constItScope;
typedef lstScopeT::const_iterator constItLstScope;
typedef prmsT::const_iterator     constItPrms;
typedef prmsT::const_reverse_iterator constRevItPrms;
typedef prmsT::iterator           itPrms;
typedef prmsT::reverse_iterator   itRevPrms;
typedef lstprmsT::const_iterator  constItLstPrms;
typedef lstTdc::const_iterator    constItlstTdc;
typedef boost::spirit::classic::parser_error<const char*, iterator_T> cnome_parser_error;
typedef std::list<std::size_t>    lstSizesT;

enum eParameterType {
	unknown,
	method_parameter,
	template_parameter
};
}  // namespace cnome

#endif // CNOME_TYPEDEFS_H

